{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Trellis Stacked Bar Chart\n",
    "=========================\n",
    "This is an example of a horizontal stacked bar chart using data which contains crop yields over different regions and different years in the 1930s.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "import altair as alt\n",
    "alt.data_transformers.enable('json')\n",
    "from vega_datasets import data\n",
    "\n",
    "barley = data.barley()\n",
    "\n",
    "alt.Chart(barley).mark_bar().encode(\n",
    "    column='year',\n",
    "    x='sum(yield)',\n",
    "    y='variety',\n",
    "    color='site'\n",
    ").properties(\n",
    "    width=250\n",
    ")\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "env": {},
   "interrupt_mode": "signal",
   "language": "python",
   "metadata": {},
   "name": "python3"
  },
  "language": "python"
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
